<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>RT-Thread RTOS: Runtime Trace and Record</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">RT-Thread RTOS
   &#160;<span id="projectnumber">1.2.0</span>
   </div>
   <div id="projectbrief">An open source embedded real-time operating system</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('group___hook.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Runtime Trace and Record<div class="ingroups"><a class="el" href="group___kernel.html">RT-Thread Kernel API</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga47689b07705c1e7892f6ec397152e9ac"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___hook.html#ga47689b07705c1e7892f6ec397152e9ac">rt_thread_idle_sethook</a> (void(*hook)(void))</td></tr>
<tr class="separator:ga47689b07705c1e7892f6ec397152e9ac"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga909761c80493569b64558225d7f89e77"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___hook.html#ga909761c80493569b64558225d7f89e77">rt_malloc_sethook</a> (void(*hook)(void *ptr, <a class="el" href="group___basic_def.html#ga8011d259fdfc54b8a9aa006b4d49ac14">rt_size_t</a> size))</td></tr>
<tr class="separator:ga909761c80493569b64558225d7f89e77"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf556549fc541bfc634f37f2dca004547"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___hook.html#gaf556549fc541bfc634f37f2dca004547">rt_free_sethook</a> (void(*hook)(void *ptr))</td></tr>
<tr class="separator:gaf556549fc541bfc634f37f2dca004547"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga358d3559267d1c8c66c836ed2e08433b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___hook.html#ga358d3559267d1c8c66c836ed2e08433b">rt_mp_alloc_sethook</a> (void(*hook)(struct <a class="el" href="structrt__mempool.html">rt_mempool</a> *mp, void *block))</td></tr>
<tr class="separator:ga358d3559267d1c8c66c836ed2e08433b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gafd43b13db5623925756b7a3968aa3b01"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___hook.html#gafd43b13db5623925756b7a3968aa3b01">rt_mp_free_sethook</a> (void(*hook)(struct <a class="el" href="structrt__mempool.html">rt_mempool</a> *mp, void *block))</td></tr>
<tr class="separator:gafd43b13db5623925756b7a3968aa3b01"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae6da0f4b7b9afc54b8666a0581ec4ed0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___hook.html#gae6da0f4b7b9afc54b8666a0581ec4ed0">rt_module_load_sethook</a> (void(*hook)(<a class="el" href="structrt__module.html">rt_module_t</a> module))</td></tr>
<tr class="separator:gae6da0f4b7b9afc54b8666a0581ec4ed0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga967257af8155a771eca4807da56d264e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___hook.html#ga967257af8155a771eca4807da56d264e">rt_module_unload_sethook</a> (void(*hook)(<a class="el" href="structrt__module.html">rt_module_t</a> module))</td></tr>
<tr class="separator:ga967257af8155a771eca4807da56d264e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8bac83f313b9fb0215c424bec05174bd"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___hook.html#ga8bac83f313b9fb0215c424bec05174bd">rt_object_attach_sethook</a> (void(*hook)(struct <a class="el" href="structrt__object.html">rt_object</a> *object))</td></tr>
<tr class="separator:ga8bac83f313b9fb0215c424bec05174bd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga28dd3af85707fc6c9bf548fe53460aca"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___hook.html#ga28dd3af85707fc6c9bf548fe53460aca">rt_object_detach_sethook</a> (void(*hook)(struct <a class="el" href="structrt__object.html">rt_object</a> *object))</td></tr>
<tr class="separator:ga28dd3af85707fc6c9bf548fe53460aca"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gabfce5c06de6e1cd6b661b05cb9dd6242"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___hook.html#gabfce5c06de6e1cd6b661b05cb9dd6242">rt_object_trytake_sethook</a> (void(*hook)(struct <a class="el" href="structrt__object.html">rt_object</a> *object))</td></tr>
<tr class="separator:gabfce5c06de6e1cd6b661b05cb9dd6242"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga69054a027dcc8483b65fd48740eb3717"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___hook.html#ga69054a027dcc8483b65fd48740eb3717">rt_object_take_sethook</a> (void(*hook)(struct <a class="el" href="structrt__object.html">rt_object</a> *object))</td></tr>
<tr class="separator:ga69054a027dcc8483b65fd48740eb3717"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad107a57fce56ef991d673fa21c6d065a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___hook.html#gad107a57fce56ef991d673fa21c6d065a">rt_object_put_sethook</a> (void(*hook)(struct <a class="el" href="structrt__object.html">rt_object</a> *object))</td></tr>
<tr class="separator:gad107a57fce56ef991d673fa21c6d065a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaab5cba09f1bfbfc0e8b0838ee2682c62"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___hook.html#gaab5cba09f1bfbfc0e8b0838ee2682c62">rt_scheduler_sethook</a> (void(*hook)(struct <a class="el" href="structrt__thread.html">rt_thread</a> *from, struct <a class="el" href="structrt__thread.html">rt_thread</a> *to))</td></tr>
<tr class="separator:gaab5cba09f1bfbfc0e8b0838ee2682c62"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf048118e9baee3eb9933a19a0ab80f69"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___hook.html#gaf048118e9baee3eb9933a19a0ab80f69">rt_timer_timeout_sethook</a> (void(*hook)(struct <a class="el" href="structrt__timer.html">rt_timer</a> *timer))</td></tr>
<tr class="separator:gaf048118e9baee3eb9933a19a0ab80f69"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>In order to trace and record RT-Thread activity in runtime, a hook mechanism is introduced.</p>
<p>The hooks are a series of routines, which are invoked in some special checkpoints. The hook routines include:</p>
<ul>
<li>object hook, invoked at object created, deleted, taken and put etc.</li>
<li>scheduler hook, invoked at thread switch and idle thread loop.</li>
<li>memory hook, invoked when allocate or free memory block.</li>
<li>timer hook, invoked when timer is timeout. </li>
</ul>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="ga47689b07705c1e7892f6ec397152e9ac"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void rt_thread_idle_sethook </td>
          <td>(</td>
          <td class="paramtype">void(*)(void)&#160;</td>
          <td class="paramname"><em>hook</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This function will set a hook function to idle thread loop.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">hook</td><td>the specified hook function</td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>the hook function must be simple and never be blocked or suspend. </dd></dl>

</div>
</div>
<a class="anchor" id="ga909761c80493569b64558225d7f89e77"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void rt_malloc_sethook </td>
          <td>(</td>
          <td class="paramtype">void(*)(void *ptr, <a class="el" href="group___basic_def.html#ga8011d259fdfc54b8a9aa006b4d49ac14">rt_size_t</a> size)&#160;</td>
          <td class="paramname"><em>hook</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This function will set a hook function, which will be invoked when a memory block is allocated from heap memory.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">hook</td><td>the hook function </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gaf556549fc541bfc634f37f2dca004547"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void rt_free_sethook </td>
          <td>(</td>
          <td class="paramtype">void(*)(void *ptr)&#160;</td>
          <td class="paramname"><em>hook</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This function will set a hook function, which will be invoked when a memory block is released to heap memory.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">hook</td><td>the hook function </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga358d3559267d1c8c66c836ed2e08433b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void rt_mp_alloc_sethook </td>
          <td>(</td>
          <td class="paramtype">void(*)(struct <a class="el" href="structrt__mempool.html">rt_mempool</a> *mp, void *block)&#160;</td>
          <td class="paramname"><em>hook</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This function will set a hook function, which will be invoked when a memory block is allocated from memory pool.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">hook</td><td>the hook function </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gafd43b13db5623925756b7a3968aa3b01"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void rt_mp_free_sethook </td>
          <td>(</td>
          <td class="paramtype">void(*)(struct <a class="el" href="structrt__mempool.html">rt_mempool</a> *mp, void *block)&#160;</td>
          <td class="paramname"><em>hook</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This function will set a hook function, which will be invoked when a memory block is released to memory pool.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">hook</td><td>the hook function </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gae6da0f4b7b9afc54b8666a0581ec4ed0"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void rt_module_load_sethook </td>
          <td>(</td>
          <td class="paramtype">void(*)(<a class="el" href="structrt__module.html">rt_module_t</a> module)&#160;</td>
          <td class="paramname"><em>hook</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This function will set a hook function, which will be invoked when module be loaded to system.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">hook</td><td>the hook function </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga967257af8155a771eca4807da56d264e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void rt_module_unload_sethook </td>
          <td>(</td>
          <td class="paramtype">void(*)(<a class="el" href="structrt__module.html">rt_module_t</a> module)&#160;</td>
          <td class="paramname"><em>hook</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This function will set a hook function, which will be invoked when module be unloaded from system.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">hook</td><td>the hook function </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga8bac83f313b9fb0215c424bec05174bd"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void rt_object_attach_sethook </td>
          <td>(</td>
          <td class="paramtype">void(*)(struct <a class="el" href="structrt__object.html">rt_object</a> *object)&#160;</td>
          <td class="paramname"><em>hook</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This function will set a hook function, which will be invoked when object attaches to kernel object system.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">hook</td><td>the hook function </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga28dd3af85707fc6c9bf548fe53460aca"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void rt_object_detach_sethook </td>
          <td>(</td>
          <td class="paramtype">void(*)(struct <a class="el" href="structrt__object.html">rt_object</a> *object)&#160;</td>
          <td class="paramname"><em>hook</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This function will set a hook function, which will be invoked when object detaches from kernel object system.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">hook</td><td>the hook function </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gabfce5c06de6e1cd6b661b05cb9dd6242"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void rt_object_trytake_sethook </td>
          <td>(</td>
          <td class="paramtype">void(*)(struct <a class="el" href="structrt__object.html">rt_object</a> *object)&#160;</td>
          <td class="paramname"><em>hook</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This function will set a hook function, which will be invoked when object is taken from kernel object system.</p>
<p>The object is taken means: semaphore - semaphore is taken by thread mutex - mutex is taken by thread event - event is received by thread mailbox - mail is received by thread message queue - message is received by thread</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">hook</td><td>the hook function </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga69054a027dcc8483b65fd48740eb3717"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void rt_object_take_sethook </td>
          <td>(</td>
          <td class="paramtype">void(*)(struct <a class="el" href="structrt__object.html">rt_object</a> *object)&#160;</td>
          <td class="paramname"><em>hook</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This function will set a hook function, which will be invoked when object have been taken from kernel object system.</p>
<p>The object have been taken means: semaphore - semaphore have been taken by thread mutex - mutex have been taken by thread event - event have been received by thread mailbox - mail have been received by thread message queue - message have been received by thread timer - timer is started</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">hook</td><td>the hook function </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gad107a57fce56ef991d673fa21c6d065a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void rt_object_put_sethook </td>
          <td>(</td>
          <td class="paramtype">void(*)(struct <a class="el" href="structrt__object.html">rt_object</a> *object)&#160;</td>
          <td class="paramname"><em>hook</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This function will set a hook function, which will be invoked when object is put to kernel object system.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">hook</td><td>the hook function </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gaab5cba09f1bfbfc0e8b0838ee2682c62"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void rt_scheduler_sethook </td>
          <td>(</td>
          <td class="paramtype">void(*)(struct <a class="el" href="structrt__thread.html">rt_thread</a> *from, struct <a class="el" href="structrt__thread.html">rt_thread</a> *to)&#160;</td>
          <td class="paramname"><em>hook</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This function will set a hook function, which will be invoked when thread switch happens.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">hook</td><td>the hook function </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gaf048118e9baee3eb9933a19a0ab80f69"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void rt_timer_timeout_sethook </td>
          <td>(</td>
          <td class="paramtype">void(*)(struct <a class="el" href="structrt__timer.html">rt_timer</a> *timer)&#160;</td>
          <td class="paramname"><em>hook</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This function will set a hook function, which will be invoked when timer is timeout.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">hook</td><td>the hook function </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer">Generated on Mon Jan 6 2014 23:05:02 for RT-Thread RTOS by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.5 </li>
  </ul>
</div>
</body>
</html>
